import java.util.Scanner;

public class Grade {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你的成绩：");
        int grade = scanner.nextInt();
        if(grade >= 0){
            switch (grade/10){
                case 10:
                case 9:
                    System.out.println("成绩为A");
                    break;
                case 8:
                    System.out.println("成绩为B");
                    break;
                case 7:
                case 6:
                    System.out.println("成绩为C");
                    break;
                default:
                    System.out.println("成绩为D");
                    break;
            }
        }
        else {
            System.out.println("成绩无效！");
        }
    }
}
